<layout name="master"/>


<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
    <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
    <li><a href="#">UI kit</a></li>
    <li><a href="#">Form</a></li>
    <li class="active">Elements</li>
</ul>
<div class="m-b-md">
    <h3 class="m-b-none">分类添加</h3>
</div>
<div class="row">
    <div class="col-sm-8">
        <section class="panel panel-default">
            <header class="panel-heading font-bold">添加分类</header>
            <div class="panel-body">
                <form role="form" method="post" action="">
                    <div class="form-group">
                        <label>分类名称</label>
                        <input type="text" name='cname' value="{$olddate['cname']}" class="form-control">
                    </div>
                    <div class="form-group">
                        <label>所属种类</label>
                        <select name="nid" id="inputID" class="form-control">
                            <option value=""> -- Select One --</option>
                            <foreach name="nature" item="vo">
                                <option <if condition="$vo['nid'] eq $olddate['nid'] "> selected </if> value="{$vo['nid']}">{$vo['nname']}</option>
                            </foreach>
                        </select>
                    </div>
                    <?php if(isset($_GET['cid'])){?>
                    <input type="hidden" name="sid" value="<?php echo $_GET['cid']?>">
                    <?php }else{?>
                    <input type="hidden" name="sid" value="0">
                    <?php }?>
                    <div class="form-group">
                        <label>添加人</label>
                        <input value="{$olddate['adduser']}" type="text" <if condition="isset($olddate['adduser'])"> disabled </if> name="adduser" class="form-control">
                    </div>
                    <button type="submit" class="btn btn-sm btn-default">提交</button>
                </form>
            </div>
        </section>
    </div>
</div>


